home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / tbp300.zip / TB300.TXT < prev    next >
Text File  |  1992-03-03  |  2KB  |  44 lines

  1.                     NOVELL TECHNICAL BULLETIN
  2.  
  3.            TITLE:  Using IF EXIST...NUL on Network Drives
  4.     DOCUMENT ID#:  TB.P.300
  5.             DATE:  3 March 1992
  6.          PRODUCT:  NetWare, DOS
  7. PRODUCT REVISION:  All
  8.       SUPERSEDES:  N/A
  9.  
  10.          SYMPTOM:  Incorrect results when using IF EXIST with the
  11.                    NUL operator on a network drive. 
  12.  
  13. ISSUE/PROBLEM
  14.  
  15. Users have reported incorrect results when using the IF EXIST batch
  16. file command with the NUL operator to determine whether a directory
  17. exists on a network drive.  An example of this command is IF EXIST
  18. F:\TEST\91\NUL.  The error occurs because the NetWare shell sees
  19. NUL as a DOS device instead of a filename.  As a result, it passes
  20. the command to DOS, which does not recognize the network drive (F:
  21. in the example above).  DOS then ignores the command and returns an
  22. exit code of 0 (success). 
  23.  
  24. Using the above IF EXIST command on a local drive (for example, IF
  25. EXIST C:\TEST\91\NUL) poses no problem to the user, and the
  26. appropriate status is returned. 
  27.  
  28. SOLUTION
  29.  
  30. There are two possible workarounds to this problem.
  31.  
  32. The first is to use *.* in place of the NUL operator in the IF
  33. EXIST statement.  This is 100% effective as long as the directory
  34. in question is not empty.
  35.  
  36. Users may, as an alternate workaround, redesign their batch file
  37. approach to avoid the above limitations.
  38.  
  39. Novell Engineering has determined that in order to address this
  40. anomaly (which occurs in the client between DOS and certain shell
  41. device drivers), significant re-engineering of the shell would be
  42. necessary.  This would lead to a drastic increase in the size of
  43. the shell.  Since such an increase is an unacceptable solution, the
  44. user should implement one or both of the two workarounds above.